package _12_proxy_pattern.v4_0;

public class Client {
	public static void main(String[] args) {
		//定义一个游戏的角色
		IGamePlayer player = new GamePlayer("张三");
		//开始打游戏，记下时间戳
		System.out.println("开始时间是：2009-8-25 10:45");
		player.login("zhangSan", "password");
		//开始杀怪
		player.killBoss();
		//升级
		player.upgrade();
		//记录结束游戏时间
		System.out.println("结束时间是：2009-8-26 03:40");

		IGamePlayer iGamePlayer = new GamePlayerProxy(new GamePlayer("张桑"));
		iGamePlayer.login("aa","bb");
		iGamePlayer.killBoss();
		iGamePlayer.upgrade();

		IGamePlayer 张桑 = new GamePlayer("张桑").getProxy();
		张桑.login("b","a");
		张桑.killBoss();
		张桑.upgrade();

	}
}